//
// Created by yl on 2020/10/5.
//
#include "..\\code\\dataStruct.h"
#include "..\\code\\common.h"
//#include "..\\dataStruct.h"
//#include "..\\common.h"
extern int synReclosePredicate(double angleDiff, double slipDiff, double closeTime, double angleDiffSet);
void meaTelecontrol(meaDevice* device) {
    if (device->remoteControlSignal == 0) {
        device->tripSignals = synReclosePredicate(device->angleDifference, device->slipDifference, 0.2, 20);
        if (device->tripSignals == 0 && device->brkStatus[0] + device->brkStatus[1] + device->brkStatus[2] >= 1) {
            meaWriteLog(device, "测控装置遥控合闸");
        }
    } else {
        device->tripSignals = device->remoteControlSignal;
    }
}
